package com.triones.biz.infra.entity.file.bo;

import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 文件业务对象 tr_infra_file
 *
 * @author triones
 * 2023-09-20
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class FileBO extends BaseEntity {
    /**
     * 文件编号
     */
    @NotNull(message = "文件编号不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 配置编号
     */
    @NotNull(message = "配置编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long configId;

    /**
     * 文件名
     */
    @NotBlank(message = "文件名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 文件路径
     */
    @NotBlank(message = "文件路径不能为空", groups = { AddGroup.class, EditGroup.class })
    private String path;

    /**
     * 文件 URL
     */
    @NotBlank(message = "文件 URL不能为空", groups = { AddGroup.class, EditGroup.class })
    private String url;

    /**
     * 文件类型
     */
    @NotBlank(message = "文件类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String type;

    /**
     * 文件大小
     */
    @NotNull(message = "文件大小不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer size;

}
